/**
 * 
 */
package com.shengruan.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.shengruan.admin.jdbc.ArticleJdbc;
import com.shengruan.admin.vo.Article;

/**
 * @author liubin
 *
 */
public class TestServlet extends HttpServlet{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException 
	{
		int id = 1;
		try
		{
			id = Integer.parseInt(request.getParameter("id"));
		}
		catch(Exception ex)
		{
			
		}
		ArticleJdbc articleJdbc = new ArticleJdbc();
		Article article = articleJdbc.getById(id);
		if(article==null)
		{
			
		}
	
		request.setAttribute("article",article);
		request.getRequestDispatcher("/showAff.jsp").forward(request, response);
	}
}
